using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableViewDeltaRecords
	{
		public const string Table = "View_DeltaRecords";
		public const string DeltaRecordsID = "DeltaRecordsID";
		public const string MemberAccountID = "MemberAccountID";
		public const string GiftCardsID = "GiftCardsID";
		public const string CardNumber = "CardNumber";
		public const string Amount = "Amount";
		public const string Validity = "Validity";
		public const string Remarks = "Remarks";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
		public const string LoginName = "LoginName";
	}
	
	[Serializable]
	public class BaseViewDeltaRecords
		: IDbSessionEntity, IJsonClass
	{
		int m_DeltaRecordsID;
		/// <summary>
        /// 
        /// </summary>
        public int DeltaRecordsID
        {
            get { return m_DeltaRecordsID; }
            set { m_DeltaRecordsID = value; }
        }
		
		int? m_MemberAccountID;
		/// <summary>
        /// 
        /// </summary>
        public int? MemberAccountID
        {
            get { return m_MemberAccountID; }
            set { m_MemberAccountID = value; }
        }
		
		int m_GiftCardsID;
		/// <summary>
        /// 
        /// </summary>
        public int GiftCardsID
        {
            get { return m_GiftCardsID; }
            set { m_GiftCardsID = value; }
        }
		
		string m_CardNumber;
		/// <summary>
        /// 
        /// </summary>
        public string CardNumber
        {
            get { return m_CardNumber; }
            set { m_CardNumber = value; }
        }
		
		double m_Amount;
		/// <summary>
        /// 
        /// </summary>
        public double Amount
        {
            get { return m_Amount; }
            set { m_Amount = value; }
        }
		
		DateTime m_Validity;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Validity
        {
            get { return m_Validity; }
            set { m_Validity = value; }
        }
		
		string m_Remarks;
		/// <summary>
        /// 
        /// </summary>
        public string Remarks
        {
            get { return m_Remarks; }
            set { m_Remarks = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		string m_LoginName;
		/// <summary>
        /// 
        /// </summary>
        public string LoginName
        {
            get { return m_LoginName; }
            set { m_LoginName = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_DeltaRecordsID = reader[TableViewDeltaRecords.DeltaRecordsID];
            m_MemberAccountID = reader[TableViewDeltaRecords.MemberAccountID];
            m_GiftCardsID = reader[TableViewDeltaRecords.GiftCardsID];
            m_CardNumber = reader[TableViewDeltaRecords.CardNumber];
            m_Amount = reader[TableViewDeltaRecords.Amount];
            m_Validity = reader[TableViewDeltaRecords.Validity];
            m_Remarks = reader[TableViewDeltaRecords.Remarks];
            m_Creater = reader[TableViewDeltaRecords.Creater];
            m_CreatedBy = reader[TableViewDeltaRecords.CreatedBy];
            m_Created = reader[TableViewDeltaRecords.Created];
            m_Modified = reader[TableViewDeltaRecords.Modified];
            m_ModifiedBy = reader[TableViewDeltaRecords.ModifiedBy];
            m_ModifiedByID = reader[TableViewDeltaRecords.ModifiedByID];
            m_LoginName = reader[TableViewDeltaRecords.LoginName];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
        }
		
		public string TableName
        {
            get { return TableViewDeltaRecords.Table; }
        }
		#endregion
		
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_DeltaRecordsID = hashToRead["DeltaRecordsID"];
			 
             m_MemberAccountID = hashToRead["MemberAccountID"];
			 
             m_GiftCardsID = hashToRead["GiftCardsID"];
			 
             m_CardNumber = hashToRead["CardNumber"];
			 
             m_Amount = hashToRead["Amount"];
			 
             m_Validity = hashToRead["Validity"];
			 
             m_Remarks = hashToRead["Remarks"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
             m_LoginName = hashToRead["LoginName"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["DeltaRecordsID"] = DeltaRecordsID;
			
            hashToFill["MemberAccountID"] = MemberAccountID;
			
            hashToFill["GiftCardsID"] = GiftCardsID;
			
            hashToFill["CardNumber"] = CardNumber;
			
            hashToFill["Amount"] = Amount;
			
            hashToFill["Validity"] = Validity;
			
            hashToFill["Remarks"] = Remarks;
			
            hashToFill["Creater"] = Creater;
			
            hashToFill["CreatedBy"] = CreatedBy;
			
            hashToFill["Created"] = Created;
			
            hashToFill["Modified"] = Modified;
			
            hashToFill["ModifiedBy"] = ModifiedBy;
			
            hashToFill["ModifiedByID"] = ModifiedByID;
			
            hashToFill["LoginName"] = LoginName;
			
        }

        #endregion
		
	}
}
